<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<!DOCTYPE html>
<html>

<head>
    <meta charset="utf-8">
    <title>登录</title>
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta name="description" content="">
    <meta name="author" content="">
    <jsp:include page="backend/inc/js.jsp"/>
    <!-- CSS -->
    <link rel="stylesheet" href="static/login/css/reset.css">
    <link rel="stylesheet" href="static/login/css/supersized.css">
    <link rel="stylesheet" href="static/login/css/style.css">


    <!-- HTML5 shim, for IE6-8 support of HTML5 elements -->
    <!--[if lt IE 9]>
    <script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
    <![endif]-->

</head>

<body oncontextmenu="return false">

<div class="page-container">
    <h1>铁路安全防护系统</h1>

    <form id="loginForm" action="login/check" method="post">
        <div>
            <input type="text" style="border-color: #ffffff" name="account" class="username" placeholder="账号" autocomplete="off"/>
        </div>
        <div style="margin-bottom: 8px">
            <input type="password" style="border-color: #ffffff" name="password" class="password" placeholder="密码" oncontextmenu="return false" onpaste="return false"/>
        </div>
        <span id="errorInfo" style="font-size: small;">${error}</span>
        <button onclick="subForm()" type="submit" style="margin-top: 10px;">登 录</button>
    </form>
</div>

<!-- Javascript -->
<script src="static/js/jquery.min.js"></script>
<script src="static/login/js/supersized.3.2.7.min.js"></script>
<script src="static/login/js/supersized-init.js"></script>
<script type="application/javascript">

    laydate.render({
        elem: '#startTime'
        , type: 'datetime'
    });

    var u = $("input[name=username]");
    var p = $("input[name=password]");



    function subForm() {


        if (u.val() == '' || p.val() == '') {
            $("#ts").html("用户名或密码不能为空");
            is_show();
            return false;
        } else {
            var reg = /^[0-9A-Za-z]+$/;
            if (!reg.exec(u.val())) {
                $("#ts").html("用户名格式不正确");
                is_show();
                return false;
            }
        }

        $('#loginForm').submit();
    }
</script>
</body>

</html>
